﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Forms;
using Rotempco.ProjectCreator.Logic;

namespace Rotempco.ProjectCreator
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void button_CreateProject_Click(object sender, RoutedEventArgs e)
        {
            CreateNewProjectLogic.CreateProject(textBox_RotempcoCoreRoot.Text, textBox_NewProjectSolutionFolder.Text, textBox_ProjectName.Text);
            System.Windows.MessageBox.Show("Done");
        }

        private void button_BrowseForRotempcoCoreProjectFile_Click(object sender, RoutedEventArgs e)
        {
            FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog();

            folderBrowserDialog.ShowNewFolderButton = false;
            if (folderBrowserDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                textBox_RotempcoCoreRoot.Text = folderBrowserDialog.SelectedPath;
        }

        private void button_BrowseToProjectCoreFile_Click(object sender, RoutedEventArgs e)
        {
            FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog();
            
            folderBrowserDialog.ShowNewFolderButton = false;
            if (folderBrowserDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                textBox_NewProjectSolutionFolder.Text = folderBrowserDialog.SelectedPath;
            }
        }
    }
}
